import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

/**
 * Created by mislead on 2015/6/4.
 */
public class HelloComponent implements ApplicationComponent {
    public HelloComponent() {
    }

    public void initComponent() {
        // TODO: insert component initialization logic here
    }

    public void disposeComponent() {
        // TODO: insert component disposal logic here
    }

    @NotNull
    public String getComponentName() {
        return "HelloComponent";
    }

    public void sayHello() {
        JFrame frame = new JFrame("NewForm");
        HelloGui gui = new HelloGui();
        frame.setContentPane(new HelloGui().panel1);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);

//        Messages.showMessageDialog("hello, plugin", "hello", Messages.getInformationIcon());
    }
}
